#ifdef USAGECOROUTINE

#ifndef COROUTINEC_H
#define COROUTINEC_H

#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#ifdef __linux__
#include <pthread.h>

#include "commonhead.h"

int coroutine_create(int fd, coroutine_func func, void* arg);
void coroutine_yield();
void coroutine_resume(int id);

typedef int (*CallbackParser_coroutine)(char *Recvbuff,char *Sendbuff);
void SetCallbackFun_coroutine(CallbackParser_coroutine callback_coroutine);
void NetworkStart_coroutine(pthread_t *tid);

extern CallbackParser_coroutine callbackParser_coroutine;
#endif

#endif

#endif